/// Plugin trait definitions

use serde_json::Value;
use std::result::Result;

/// Management trait - shared by all plugins
pub trait PluginBase: Send + Sync {
    fn plugin_type(&self) -> &str;
}

/// Service plugin trait
pub trait ServicePlugin: PluginBase {
    fn get_sample_output(&self) -> String;
    fn parse_evidence(&self, evidence: &Value, nonce: Option<String>) -> Result<Value, String>;
}

/// Agent plugin trait
pub trait AgentPlugin: PluginBase {
    fn collect_evidence(&self, nonce: Option<String>) -> Result<Value, String>;
}

/// Trait for getting singleton instances of plugin managers
pub trait PluginManagerInstance {
    fn get_instance() -> &'static Self;
}
